home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / NDK / NDK_3.5 / Documentation / Autodocs / fuelgauge_gc.doc < prev    next >
Encoding:
Text File  |  1999-10-29  |  6.5 KB  |  211 lines

  1. TABLE OF CONTENTS
  2.  
  3. fuelgauge_gc/--datasheet--
  4. fuelgauge_gc/FUELGAUGE_GetClass
  5. fuelgauge_gc/--datasheet--                         fuelgauge_gc/--datasheet--
  6.  
  7.     NAME
  8.         fuelgauge_gc -- create fuelgauge BOOPSI objects
  9.  
  10.     SUPERCLASS
  11.         gadgetclass
  12.  
  13.     REQUIRES
  14.         bevel.image
  15.  
  16.     DESCRIPTION
  17.         The fuelgauge gadget class is used to display stage of completion
  18.         of some operation, such as formating a floppy. Or, perhaps as
  19.         a means of indication, such as free drive space.
  20.  
  21.         Advantages that this class provides:
  22.  
  23.          > Supports window relativity.
  24.  
  25.          > Optional tick marks, and short ticks.
  26.  
  27.          > Ability to change background pen, text pen, and filltext pen.
  28.  
  29.          > Supports OS 3.0 BOOPSI Gadget HelpTest.
  30.  
  31.     METHODS
  32.         OM_NEW -- Passed to superclass to creates object instance
  33.  
  34.         OM_SET -- Sets all possible settings, then passed to superclass
  35.  
  36.         OM_GET -- Returns requested setting or passed to superclass
  37.  
  38.         OM_DISPOSE -- Passed to superclass
  39.  
  40.         GM_HITTEST -- Returns 0.
  41.  
  42.         GM_RENDER -- Passed to superclass, then renders fuelgauge
  43.  
  44.         GM_DOMAIN -- Returns GDOMAIN_MINIMUM, GDOMAIN_NOMINAL and
  45.             GDOMAIN_MAXIMUM dimensions.
  46.  
  47.         GM_GOACTIVE -- NO OP
  48.         GM_HANDLEINPUT -- NO OP
  49.         GM_GOINACTIVE -- NO OP
  50.  
  51.     ATTRIBUTES
  52.  
  53.         GA_Text (STRPTR)
  54.             Used to specify the NULL terminated string to use
  55.             as the text for the gadget.  The Text() function is used to draw
  56.             the text. NULL is valid input, and will enable the default
  57.             centered percentage rendering. Changing the label will invoke
  58.             GM_RENDER. Text string is clipped to fit inside the gauge via
  59.             the TextFit() function. The text string may contain varargs
  60.             format specifiers compatible to RawDoFmt() if the varargs data
  61.             is supplied via FUELGAUGE_VarArgs.
  62.  
  63.             Applicability is (OM_NEW, OM_SET)
  64.         
  65.         FUELGAUGE_Min (LONG)
  66.             Minimum value of the gauge.
  67.  
  68.             Applicability is (OM_NEW, OM_SET, OM_UPDATE, OM_GET, OM_NOTIFY)
  69.  
  70.         FUELGAUGE_Max (LONG)
  71.             Maximum value of the gauge.
  72.  
  73.             Applicability is (OM_NEW, OM_SET, OM_UPDATE, OM_GET, OM_NOTIFY)
  74.  
  75.         FUELGAUGE_Level (LONG)
  76.             Current gauge setting, usually something between Min and Max.
  77.             Base on Min, Max and Current a percentage can be calculated
  78.             and displayed by the gadget.
  79.  
  80.             Applicability is (OM_NEW, OM_SET, OM_UPDATE, OM_GET, OM_NOTIFY)
  81.  
  82.         FUELGAUGE_Orientation (WORD)
  83.             Sets the orientation of the fuel gauge to vertical or
  84.             horizontal.
  85.  
  86.             Accepted values as defined in <gadgets/fuelgauge.h> are: 
  87.  
  88.                FGORIENT_HORIZ
  89.                FGORIENT_VERT
  90.  
  91.             Defaults to FGORIENT_HORIZ
  92.  
  93.             Applicability is (OM_NEW, OM_SET, OM_UPDATE)
  94.  
  95.         FUELGAUGE_Percent (WORD)
  96.             Enable/Disable Percentage display.
  97.             Percentage is displayed in the center of the gauge using
  98.             the requested font, provided it fits within the gadget bounds.
  99.  
  100.             Defaults to TRUE
  101.  
  102.             Applicability is (OM_NEW, OM_SET, OM_UPDATE, OM_GET)
  103.  
  104.         FUELGAUGE_Ticks (BOOL)
  105.             Sets the number of "tickmarks" rendered along the bottom
  106.             of the gadget. Take note, the tickmarks are rendered within
  107.             the gadgets size dimentions. Values greater than 0 enable
  108.             the tick mark(s).
  109.  
  110.             Defaults to 0
  111.  
  112.             Applicability is (OM_NEW, OM_SET, OM_UPDATE)
  113.  
  114.         FUELGAUGE_ShortTicks (BOOL)
  115.             Enables rendering of "shortticks", smaller size tickmarks
  116.             rendered in between the larger tick marks.
  117.  
  118.             Defaults to FALSE,
  119.  
  120.             Applicability is (OM_NEW, OM_SET, OM_UPDATE)
  121.  
  122.         FUELGAUGE_TickSize (WORD)
  123.             Sets the size, in pixels, of the large tickmarks.
  124.             Shorttick size is TickHeight / 2. Note, if NOT setting
  125.             FUELGAUGE_Ticks non-zero, then you may need to 0 this as
  126.             well depending on the fuelgauge release version!
  127.  
  128.             Defaults to 5 pixels
  129.  
  130.             Applicability is (OM_NEW, OM_SET, OM_UPDATE)
  131.  
  132.         FUELGAUGE_TickPen (WORD)
  133.             Pen number used to render the tickmarks.
  134.  
  135.             Defaults to SHINEPEN.
  136.  
  137.             Applicability is (OM_NEW, OM_SET, OM_UPDATE)
  138.  
  139.         FUELGAUGE_PercentPen (WORD)
  140.             Pen number used to render the percentage text label.
  141.  
  142.             Defaults to TEXTPEN.
  143.  
  144.             Applicability is (OM_NEW, OM_SET, OM_UPDATE)
  145.  
  146.         FUELGAUGE_EmptyPen (WORD)
  147.             Pen number used to render the empty section of the gauge.
  148.  
  149.             Defaults to BACKGROUNDPEN.
  150.  
  151.             Applicability is (OM_NEW, OM_SET, OM_UPDATE)
  152.  
  153.         FUELGAUGE_FillPen (WORD)
  154.             Pen number used to render the filled section of the gauge.
  155.  
  156.             Defaults to BACKGROUNDPEN.
  157.  
  158.             Applicability is (OM_NEW, OM_SET, OM_UPDATE)
  159.  
  160.         FUELGAUGE_VarArgs (APTR)
  161.             Varargs data array to supply data for RawDoFmt() when
  162.             format specifiers are to be used in GA_Text text strings.
  163.             The VarArgs internal result buffer is 128 bytes, take care
  164.             not to exceed this buffer.
  165.  
  166.             Defaults to NULL.
  167.  
  168.             Applicability is (OM_NEW, OM_SET)
  169.  
  170.         FUELGAUGE_Justification (WORD)
  171.             Justification mode of fuelgauge (GA_Text) text label.
  172.             Percentage rendering, when enabled, is always centered.
  173.  
  174.             Supports:
  175.  
  176.                 FGJ_LEFT
  177.                 FGJ_CENTER
  178.  
  179.             Defaults to FGJ_LEFT.
  180.  
  181.             Applicability is (OM_NEW, OM_SET)
  182. fuelgauge_gc/FUELGAUGE_GetClass               fuelgauge_gc/FUELGAUGE_GetClass
  183.  
  184.     NAME
  185.         FUELGAUGE_GetClass -- Gets the pointer to the fuelgauge class.
  186.  
  187.     SYNOPSIS
  188.         fuelgauge_class = FUELGAUGE_GetClass();
  189.         D0
  190.  
  191.         Class * FUELGAUGE_GetClass(VOID);
  192.  
  193.     FUNCTION
  194.         Obtains the pointer to the FuelGauge gadget class for use with
  195.         NewObject().  This function always returns a valid pointer so
  196.         you do not need to check it.  The reason is that if the library
  197.         opens fine, then the pointer returned is already setup.  (Of course
  198.         this implies that if opening the library fails, you shouldn't be
  199.         calling this.)
  200.  
  201.         Note that this function does not create the class, that is done
  202.         when the class library is opened.
  203.  
  204.     INPUTS
  205.         Nothing.
  206.  
  207.     RESULT
  208.         fuelgauge_class - Pointer to the FuelGauge gadget class.
  209.  
  210.     SEE ALSO
  211.